Skip to content

refactor(ads-client): changed AdRequest.url to be environment for a more stable hashing#7368

Queued
copyrighthero wants to merge 3 commits into
mozilla:mainfrom
copyrighthero:feat/ac-101--refactor-ad-request-remove-url
Queued

refactor(ads-client): changed AdRequest.url to be environment for a more stable hashing#7368
copyrighthero wants to merge 3 commits into
mozilla:mainfrom
copyrighthero:feat/ac-101--refactor-ad-request-remove-url

Conversation

@copyrighthero
Copy link
Copy Markdown
Contributor

This PR refactors the internal impl of the AdRequest struct and its hash method by switching the url attribute to be environment instead, this way the generated hashing is more stable unless the response shape changes.

Since this is AdsClient internal implementation refactor, it is non-breaking and should not be detailed in the CHANGELOG documentation.

Pull Request checklist

  • Breaking changes: This PR follows our breaking change policy
    • This PR follows the breaking change policy:
      • This PR has no breaking API changes, or
      • There are corresponding PRs for our consumer applications that resolve the breaking changes and have been approved
  • Quality: This PR builds and tests run cleanly
    • Note:
      • For changes that need extra cross-platform testing, consider adding [ci full] to the PR title.
      • If this pull request includes a breaking change, consider cutting a new release after merging.
  • Tests: This PR includes thorough tests or an explanation of why it does not
  • Changelog: This PR includes a changelog entry in CHANGELOG.md or an explanation of why it does not need one
    • Any breaking changes to Swift or Kotlin binding APIs are noted explicitly
  • Dependencies: This PR follows our dependency management guidelines
    • Any new dependencies are accompanied by a summary of the due diligence applied in selecting them.

@copyrighthero copyrighthero requested a review from Almaju May 13, 2026 16:50
@copyrighthero copyrighthero force-pushed the feat/ac-101--refactor-ad-request-remove-url branch from 8c22cc2 to 34847d8 Compare May 13, 2026 16:55
Comment thread components/ads-client/src/mars/environment.rs
Comment thread components/ads-client/src/mars/ad_request.rs Outdated
Comment thread components/ads-client/src/mars/ad_request.rs
…nt instead for the cache hashing to be more stable.
@copyrighthero copyrighthero force-pushed the feat/ac-101--refactor-ad-request-remove-url branch from 34847d8 to 7c6fbae Compare May 15, 2026 17:31
… crate's path_segments_mut to build URL instead of string concat.
@copyrighthero copyrighthero requested a review from Almaju May 15, 2026 18:07
@copyrighthero copyrighthero added this pull request to the merge queue May 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants